<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>过渡案例</title>
    <style>
      .outer {
        width: 400px;
        height: 224px;
        position: relative;
        overflow: hidden;
      }
      .mask {
        width: 400px;
        height: 224px;
        background-color: black;
        position: absolute;
        top: 0px;
        left: 0px;
        color: white;
        font-size: 100px;
        text-align: center;
        line-height: 224px;
        opacity: 0;
        transition: all 1s;
      }
      img {
        transition: 0.5s all;
      }
      .outer:hover .mask{
        opacity: 0.5;
      }
      .outer:hover img {
        transform: scale(1.8) rotateZ(20deg);

      }
    </style>
</head>
<body>
  <div class="outer">
    <img src="../images/shanghai.jpg" alt="">
    <div class="mask">上海</div>
  </div>
</body>
</html>